package ch.gibb.learnit.client.util;

import java.util.ArrayList;
import java.util.List;

/**
 * Contains a list of messages which can be displayed on the web page
 *
 * @author Bernard Jaquet
 * @version 1.0
 */
public class Messages {
    private List<String> messages;

    public List<String> getMessages() {
        return messages;
    }

    /**
     * Adds a message to the list. If necessary, the list will be initialised
     * @param message
     */
    public void addMessage(String message) {
        if(messages == null)
            messages = new ArrayList<String>();
        messages.add(message);
    }
}
